<!DOCTYPE html>
<html>
	<head>
		<title>Chat</title>
		<script type="text/javascript">
			var conn = new WebSocket('ws://localhost:8080');
				conn.onopen = function(e) {
			    console.log("Connection established!");
			};

			conn.onmessage = function(e) {
			    console.log(e.data);
			};
		</script>
	</head>
	<body>
		<input type="button" value="sayhello" onclick="javascript:conn.send('Hello World!');">
	</body>
</html>